<%@ page import="br.com.qualityempresa.seguranca.Usuario"%>
<!DOCTYPE html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName" value="${message(code: 'usuario.label', default: 'Usuario')}" />
<title>
	Quality Empresa -
	<g:message code="default.create.label" args="[entityName]" />
</title>
</head>

<body screen_capture_injected="true">

	<ul class="nav nav-pills">
		<g:permissao devePossuir="true" controles="usuario" acoes="list">
			<li>
				<g:link class="list" action="list">
					<i class="icon-list-alt"></i>
					<g:message code="default.list.label" args="[entityName]" />
				</g:link>
			</li>
		</g:permissao>
		<li class="divider-vertical"></li>
		<g:permissao devePossuir="true" controles="usuario" acoes="create">
			<li>
				<g:link action="create">
					<i class="icon-file"></i>
					<g:message code="default.add.label" args="[entityName]" />
				</g:link>
			</li>
		</g:permissao>
	</ul>

	<g:form method="post" action="save">
		<legend>
			<g:message code="default.create.label" args="[entityName]" />
		</legend>

		<mensagem:renderizar mensagem="${flash}" />

		<g:hasErrors bean="${usuarioInstance}">
			<div class="alert alert-error">
				<ul class="errors">
					<g:eachError bean="${usuarioInstance}" var="error">
						<li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>>
							<g:message error="${error}" />
						</li>
					</g:eachError>
				</ul>
			</div>
		</g:hasErrors>

		<g:render template="form" />

		<div class="control-group">
			<div class="controls">
				<g:permissao devePossuir="true" controles="usuario" acoes="save">
					<button type="submit" class="btn">
						<i class="icon-ok"></i>
						<g:message code="default.button.create.label" />
					</button>
				</g:permissao>
			</div>
		</div>

	</g:form>

</body>
</html>
